package com.ruoyi.hospital.mapper;

import java.util.List;
import com.ruoyi.hospital.domain.MaterielOutboundRecord;
import com.ruoyi.system.domain.vo.MaterielOutboundRecordVO;
import org.apache.ibatis.annotations.Param;

/**
 * 物资出库记录Mapper接口
 * 
 * @author qichi
 * @date 2023-07-10
 */
public interface MaterielOutboundRecordMapper 
{
    /**
     * 查询物资出库记录
     * 
     * @param id 物资出库记录主键
     * @return 物资出库记录
     */
    public MaterielOutboundRecord selectMaterielOutboundRecordById(Long id);

    /**
     * 查询物资出库记录
     *
     * @param customerPhone 客户手机号
     * @return 物资出库记录
     */
    List<MaterielOutboundRecord> selectMaterielOutboundRecordByCustomerPhone(String customerPhone);

    /**
     * 查询物资出库记录
     *
     * @param list 物资出库记录主键
     * @return 物资出库记录
     */
     List<MaterielOutboundRecord> selectMaterielOutboundRecordByIds(List<Long> list);

    /**
     * 查询物资出库记录列表
     * 
     * @param materielOutboundRecord 物资出库记录
     * @return 物资出库记录集合
     */
    public List<MaterielOutboundRecord> selectMaterielOutboundRecordList(MaterielOutboundRecord materielOutboundRecord);

    /**
     * 新增物资出库记录
     * 
     * @param materielOutboundRecord 物资出库记录
     * @return 结果
     */
    public int insertMaterielOutboundRecord(MaterielOutboundRecord materielOutboundRecord);

    /**
     * 修改物资出库记录
     * 
     * @param materielOutboundRecord 物资出库记录
     * @return 结果
     */
    public int updateMaterielOutboundRecord(MaterielOutboundRecord materielOutboundRecord);


    /**
     * 批量修改物资出库实际数量
     *
     * @param materielOutboundRecord 物资出库记录
     * @return 结果
     */
    int updateMaterielOutboundRecordNumber(List<MaterielOutboundRecord> materielOutboundRecord);

    /**
     * 删除物资出库记录
     * 
     * @param id 物资出库记录主键
     * @return 结果
     */
    public int deleteMaterielOutboundRecordById(Long id);

    /**
     * 批量删除物资出库记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMaterielOutboundRecordByIds(Long[] ids);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param list List<MaterielOutboundRecord> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("list") List<MaterielOutboundRecord> list);

    List<MaterielOutboundRecordVO> selectMaterielOutboundRecordListByPrescriptionIds(List<Long> list);

}
